﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OF.Component.BLL;
using OF.Utility;

namespace Tools
{
    public partial class GenerateIndexCitys : Form
    {
        public GenerateIndexCitys()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var listCity = BaseLocationOperate.GetAllSecondCities();
            var szSaveFilePath = Path.Combine(Application.StartupPath, "city.json");
            listCity.ToJSON(szSaveFilePath);

            System.Windows.Forms.MessageBox.Show(this, "json文件已生成");
            System.Diagnostics.Process.Start(szSaveFilePath);
        }
    }
}
